//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/2/7
************************************************************/
    

#include <stdio.h>

int main()
{
    int i = 0;
    int count = 0;
    int input = 0;
    scanf("%d",&input);
    for(i = 0; i < 32; i++)
    {
        if (((input >> i) & 1) == 1)
        {
            count++;
        }
    }
    printf("%d\n",count);
    
    return 0;
}
